package com.koron.configure.safetcf.mapper;

import com.koron.configure.safetcf.bean.SafetCFyBean;
import com.koron.configure.safetcf.bean.SafetCFyDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SafetyCFBeanMapper {
    int deleteByPrimaryKey(String id);

    int insert(SafetCFyBean record);

    int insertOrUpdate(SafetCFyBean record);

    int insertOrUpdateSelective(SafetCFyBean record);

    int updateBatchSelective(List<SafetCFyBean> list);

    int insertSelective(SafetCFyBean record);

    SafetCFyBean selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SafetCFyBean record);

    int updateByPrimaryKey(SafetCFyBean record);

    //查某个操作票全部安全措施数量
    Integer countByTicketType(@Param("ticketType")String ticketType);

    //查某个操作票全部安全措施
    List<SafetCFyDto> queryAllByTicketType(@Param("ticketType")String ticketType);

    /**
     * 排序号挪位
     * @param actualSort    排序号
     * @param ticketType    操作票类型
     * @param sort          条件序号
     * @return
     */
    int updateByTicketTypeAndSort(@Param("actualSort")Integer actualSort,@Param("ticketType")String ticketType,@Param("sort")Integer sort);


}
